import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import 'lib-flexible';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import 'assets/scss/index.scss';
import $ from "@/common/js/axios";
Vue.config.productionTip = false;

Vue.use(ElementUI);

/**
 * @desc LoadOn loading显示
 * @desc LoadClose loading隐藏
 * */
let loading;
Vue.prototype.LoadOn = function (text) {
  var text = text || "加载中...";
  loading = Vue.prototype.$loading({
      lock: false,
      text: text,
      background:'rgba(0,0,0,0.7)',
      target: document.querySelector(".loading-area") //设置加载动画区域
  });
};
Vue.prototype.LoadClose = function () {
  loading.close();
};

Vue.prototype.$ = $;


new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
